package com.qys.livesMall.financial.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.common.result.R;
import com.qys.livesMall.financial.model.dto.app.AppFinancialOnlineDetailPageDTO;
import com.qys.livesMall.financial.model.dto.app.FinancialOnlineContractDTO;
import com.qys.livesMall.financial.model.dto.sys.FinancialOnlineRecordPageDTO;
import com.qys.livesMall.financial.model.entity.FinancialOnline;
import com.qys.livesMall.financial.model.entity.FinancialOnlineDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.financial.model.vo.FinancialOnlineRecordVO;
import com.qys.livesMall.financial.model.vo.app.AppFinancialOnlineDetailPageVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author
 * @since 2023-06-13
 */
public interface FinancialOnlineDetailService extends IService<FinancialOnlineDetail> {

    Page<FinancialOnlineRecordVO> pageBySys(FinancialOnlineRecordPageDTO pageDTO);

    FinancialOnlineDetail init(FinancialOnline onlineFinancial, Long userId, BigDecimal maxAmount, String contract);

    Page<AppFinancialOnlineDetailPageVO> pageByApp(AppFinancialOnlineDetailPageDTO pageDTO);

    FinancialOnlineContractDTO buildContract(FinancialOnlineContractDTO cc);

    String getBuyContract(Long id);

    List<FinancialOnlineDetail> getYesterday();
}
